home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / virus / tbav702.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1996-06-21  |  11KB  |  355 lines

  1. @echo off
  2. echo off
  3. cls
  4. echo        --- Thunderbyte Anti-Virus installation batch program ---
  5. echo.
  6.  
  7. rem     * Make sure that we can find the utilities in the current directory
  8. if not exist TBSCAN.EXE goto error1
  9.  
  10. rem     * Find out if we are upgrading a previous version in the current dir
  11. if exist TBSTART.BAT goto pathexists
  12.  
  13. rem     * Make sure that the user specified a destination path
  14. if %1X==X goto error2
  15.  
  16. rem     * Make sure the target path exists or can be created
  17. if exist %1\nul goto pathexists
  18. md %1
  19. if not exist %1\nul goto error3
  20. :pathexists
  21.  
  22. rem     * Make sure user did not type something like 'C:' :-)
  23. if exist %1\CONFIG.SYS goto error5
  24.  
  25. echo Please read the License.Doc file. By using the TBAV package you
  26. echo agree with our license agreement. You can print the License.Doc
  27. echo file by typing the following command on the DOS command line:
  28. echo    Copy License.Doc Lpt1
  29. echo Press Ctrl-C to abort this installation batch file, or
  30. pause
  31.  
  32. echo.
  33. echo This installation batch file of the shareware version of TBAV
  34. echo is not the same as the full featured installation program of the
  35. echo commercial version of TBAV. (The main reason for the omission of
  36. echo the installation program is to save disk space and to minimize
  37. echo download time). Therefore the installation procedure might
  38. echo differ from the procedure described in the manual.
  39. echo.
  40.  
  41. rem     * If TbScanX is active, de-activate it.
  42. if not exist SCANX goto notres
  43. if exist %1\tbscanx.exe %1\tbscanx /off
  44.  
  45. :notres
  46. rem     * Copy the TBAV utilities if necessary
  47. if exist dummy.tst del dummy.tst >nul
  48. if exist %1\dummy.tst del %1\dummy.tst >nul
  49. echo TEST >%1\dummy.tst
  50. if exist dummy.tst goto filesexists
  51. if not exist %1\dummy.tst goto error4
  52. echo TbSetup will now delete the Anti-Vir.Dat file of a previous
  53. echo TBAV version if it exists in directory %1
  54. pause
  55. rem     * If Anti-Vir.Dat already exists and is hidden, delete it...
  56. tbsetup %1 remove
  57. cls
  58. echo Copying files. Please wait...
  59. copy addendum.doc %1 >nul
  60. copy agents.doc %1 >nul
  61. copy anti-vir.dat %1 >nul
  62. copy appnotes.doc %1 >nul
  63. copy file_id.diz %1 >nul
  64. copy install.bat %1 >nul
  65. copy license.doc %1 >nul
  66. copy makeresc.bat %1 >nul
  67. copy no_vsum.doc %1 >nul
  68. copy register.exe %1 >nul
  69. copy report.doc %1 >nul
  70. copy security.doc %1 >nul
  71. copy tbav.doc %1 >nul
  72. copy tbav.exe %1 >nul
  73. copy tbav.lng %1 >nul
  74. copy tbcheck.exe %1 >nul
  75. copy tbclean.exe %1 >nul
  76. copy tbdel.com %1 >nul
  77. copy tbdisk.exe %1 >nul
  78. copy tbdriver.exe %1 >nul
  79. copy tbdriver.lng %1 >nul
  80. copy tbfile.exe %1 >nul
  81. copy tbgensig.exe %1 >nul
  82. copy tbkey.exe %1 >nul
  83. copy tblog.exe %1 >nul
  84. copy tbmem.exe %1 >nul
  85. copy tbscan.exe %1 >nul
  86. copy tbscan.lng %1 >nul
  87. copy tbscan.sig %1 >nul
  88. copy tbscanx.exe %1 >nul
  89. copy tbsetup.dat %1 >nul
  90. copy tbsetup.exe %1 >nul
  91. copy tbutil.exe %1 >nul
  92. copy tbutil.lng %1 >nul
  93. copy veldman.pgp %1 >nul
  94. copy tbav.faq %1 >nul
  95. copy tbmon.com %1 >nul
  96. copy whatsnew.* %1 >nul
  97. if %_4ver%x==x copy descript.ion %1 >nul
  98.  
  99. :filesexists
  100. del %1\dummy.tst >nul
  101. if not exist %1\docs.exe goto nopack
  102. %1\docs -o %1
  103. del %1\docs.exe >nul
  104. :nopack
  105.  
  106. rem     * DOS has no interactive batch file commands,
  107. rem     * so we create a special program to solve that!
  108. rem     * the 'garbage' in the echo command is program code
  109. rem     * to read a key into an errorlevel, the program code
  110. rem     * will be copied into an executable file.
  111. echo ═êα╧┤L═! >%1\ask.com
  112.  
  113. echo.
  114. echo TbSetup will now generate or update the Anti-Vir.Dat file
  115. echo of the directory %1
  116. pause
  117. rem     * create or update the Anti-Vir.Dat records of the TBAV utilities
  118. %1\TBSETUP %1
  119.  
  120. cls
  121. rem     * do not overwrite an existing TBAV setup.
  122. if exist %1\TBSTART.BAT goto upgrade
  123.  
  124. echo.
  125. echo The Thunderbyte Anti-Virus utilities have been copied to the destination
  126. echo directory. It is recommended to read the documentation of TBAV thoroughly
  127. echo and to make a customized setup. One of the advantages of the Thunderbyte
  128. echo Anti-Virus utilities is flexibility and the possibility to configure
  129. echo them to suit your needs in an optimal way.
  130. echo.
  131. echo This installation batch file helps you to setup the utilities in their
  132. echo most standard and non-customized way.
  133. echo Do you want to continue? (Y/n)
  134. %1\ask
  135. if not errorlevel 1 goto nosetup
  136.  
  137. rem     * make a backup of the AUTOEXEC.BAT file!
  138. echo.
  139. echo Backing up C:\AUTOEXEC.BAT to C:\AUTOEXEC.ORG...
  140. copy c:\autoexec.bat c:\autoexec.org >nul
  141.  
  142. rem     * create a TBSTART.BAT file in the TBAV directory.
  143. echo @echo off >%1\TBSTART.BAT
  144. echo echo off >>%1\TBSTART.BAT
  145.  
  146. echo.
  147. echo For easy access of the TBAV utilities it is recommended to put them
  148. echo into your PATH environment variable.
  149. echo Do you want to add %1 to your PATH statement? (Y/n)
  150. %1\ask
  151. if not errorlevel 1 goto dosetup
  152. rem     * add the PATH statement to the end of the AUTOEXEC.BAT file.
  153. echo PATH=%%PATH%%;%1 >>C:\AUTOEXEC.BAT
  154.  
  155. :dosetup
  156. echo.
  157. echo TbSetup will now process your drives to generate the Anti-Vir.Dat files.
  158. pause
  159. rem     * process the rest of the machine, but do not touch existing information!
  160. %1\TbSetup NewOnly AllDrives
  161.  
  162. :tbdriver
  163. cls
  164. echo.
  165. echo The TBAV package contains some utilities that can be installed in the memory
  166. echo of your PC. Do you want to add them to your AUTOEXEC.BAT file? (Y/n)
  167. %1\ask
  168. if not errorlevel 1 goto autoscan
  169. rem     * create a TBSTART.BAT file in the TBAV directory.
  170. echo %1\TbDriver >>%1\TBSTART.BAT
  171.  
  172. echo.
  173. echo TBSCANX is a memory resident virus scanner.
  174. echo Do you want to install it? (Y/n)
  175. %1\ask
  176. if not errorlevel 1 goto tbcheck
  177. rem     * add the TbScanX statement to the TBSTART.BAT file.
  178. echo %1\TbScanX EMS XMS >>%1\TBSTART.BAT
  179.  
  180. :tbcheck
  181. echo.
  182. echo TBCHECK is a memory resident integrity checker.
  183. echo Do you want to install it? (Y/n)
  184. %1\ask
  185. if not errorlevel 1 goto tbmem
  186. rem     * add the TbCheck statement to the TBSTART.BAT file.
  187. echo %1\TbCheck noavok=ab >>%1\TBSTART.BAT
  188.  
  189. :tbmem
  190. echo.
  191. echo TBMEM is a resident memory guard.
  192. echo Do you want to install it? (Y/n)
  193. %1\ask
  194. if not errorlevel 1 goto tbfile
  195. rem     * add the TbMem statement to the TBSTART.BAT file.
  196. echo %1\TbMem >>%1\TBSTART.BAT
  197.  
  198. :tbfile
  199. echo.
  200. echo TBFILE is a resident file guard.
  201. echo Do you want to install it? (Y/n)
  202. %1\ask
  203. if not errorlevel 1 goto autoscan
  204. rem     * add the TbFile statement to the TBSTART.BAT file.
  205. echo %1\TbFile >>%1\TBSTART.BAT
  206.  
  207. :autoscan
  208. echo.
  209. echo Do you want the system to be scanned automatically for viruses every day? (Y/n)
  210. %1\ask
  211. if not errorlevel 1 goto addcall
  212. rem     * add the TbScan statement to the TBSTART.BAT file.
  213. echo %1\TbScan Once AllDrives >>%1\TBSTART.BAT
  214.  
  215. :addcall
  216. if exist C:\TEMP.BAT del C:\TEMP.BAT >nul
  217. echo call %1\TBSTART.BAT >C:\TEMP.BAT
  218. copy /a C:\TEMP.BAT + C:\AUTOEXEC.BAT C:\TEMP2.BAT >nul
  219. copy C:\TEMP2.BAT C:\AUTOEXEC.BAT >nul
  220. del C:\TEMP.BAT >nul
  221. del C:\TEMP2.BAT >nul
  222.  
  223. :ready
  224. echo.
  225. echo Do you want to scan your drives now? (Y/n)
  226. %1\ask
  227. if not errorlevel 1 goto starttbav
  228. %1\TbScan AllDrives
  229.  
  230. :starttbav
  231. cls
  232. :nosetup
  233. echo.
  234. echo It is highly recommended to print the TBAV user manual.
  235. echo You can do this with the following DOS command:
  236. echo    Copy TBAV.DOC Lpt1
  237. echo.
  238. echo If you are upgrading from previous TBAV versions, it is recommended
  239. echo to print the WHATSNEW files and the Addendum.Doc.
  240. echo You can do this with the following DOS command:
  241. echo    Copy WHATSNEW.* Lpt1
  242. echo    Copy ADDENDUM.DOC Lpt1
  243. echo.
  244. echo The menu program TBAV.EXE can be used to read the documentation files.
  245. echo Do you want to start TBAV now? (Y/n)
  246. %1\ask
  247. if not errorlevel 1 goto flush
  248. %1\TBAV
  249. goto end
  250.  
  251. :upgrade
  252. echo.
  253. if exist %1\UserSig.Dat %1\TbGenSig
  254. rem     * Delete all stuff we don't support anymore
  255. echo Install.Bat will delete some obsolete files from previous TBAV
  256. echo versions which are not supported anymore.
  257. echo.
  258. if exist %1\TbScan.Com del %1\TbScan.Com >nul
  259. if exist %1\TbScan.Msg del %1\TbScan.Msg >nul
  260. if exist %1\VirScan.Dat del %1\VirScan.Dat >nul
  261. if exist %1\AddnSigs.Dat del %1\AddnSigs.Dat >nul
  262. if exist %1\ComprSca.* del %1\ComprSca.* >nul
  263. if exist